//funcion para ingresar solo numeros en input text
//usar onkeypress="return isNumberKey(event)" en el tag
function isNumberKey(evt) {
    var charCode = (evt.which) ? evt.which : event.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;

    return true;
}

function PenalesClicked() {
    var MyForm = document.getElementById("FormAgregarPartido");
    if (MyForm.elements["penales"].checked == true) {
        MyForm.elements["penales_cai"].disabled = false;
        MyForm.elements["penales_rival"].disabled = false;
    } else {
        MyForm.elements["penales_cai"].disabled = true;
        MyForm.elements["penales_rival"].disabled = true;
    }
}

function TecnicoClicked() {
    var MyForm = document.getElementById("FormAgregarJugDT");
    if (MyForm.elements["tecnico"].checked == true) {
        //MyForm.elements["activo"].disabled = false;
    	$( "#activo_check" ).button( "option", "disabled", false );
    } else {
        //MyForm.elements["activo"].disabled = true;
        $( "#activo_check" ).button( "option", "disabled", true );
    }
}

function JugadorClicked() {
    var MyForm = document.getElementById("FormAgregarJugDT");
    if (MyForm.elements["jugador"].checked == true) {
        //MyForm.elements["posicion"].disabled = false;
        $( "#jug_pos input" ).button("option", "disabled", false);
    } else {
       // MyForm.elements["posicion"].disabled = true;
    	$( "#jug_pos input" ).button("option", "disabled", true);
    }
}

function ResetForm(f){
	var MyForm = document.getElementById(f);
	MyForm.reset();
}

//alert('Page contains ' + jQuery('a').length + ' <a> elements!');


/* ESTO ES VIEJO!!!  *** FIN DE ARCHIVO ***

//global variables
flag_text_cambiado = 0;
flag_mostrar = 0;
//global variables END

function BodyLoad(){
	OcultarDiv();
}

//hide all divs on the page
function OcultarDiv(){
	jQuery('div').hide();
}

//update the text contained inside of all divs
function CambiarTexto(){
	if (flag_text_cambiado == 0){
		jQuery('div').text('new content');
		flag_text_cambiado = 1;
	}else{
		jQuery('div').text('old content');
		flag_text_cambiado = 0;
	}
}

//add a class attribute with a value of updatedContent to all divs
function CambiarClass(){
	jQuery('div').addClass("updatedContent");
}

//show all divs on the page
function Mostrar(){
	if(flag_mostrar == 0){
		jQuery('div').show();
		flag_mostrar = 1;
	}else{
		jQuery('div').hide();
		flag_mostrar = 0;
	}
}

*/


